package com.example.studykotlin.kotlin_actual_combat.BaseActivity

import android.annotation.SuppressLint
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import com.example.studykotlin.ListAdapter
import com.example.studykotlin.databinding.ActivityBaseBinding

open class BaseActivity : AppCompatActivity() {
    private lateinit var binding: ActivityBaseBinding
    lateinit var listAdapter: ListAdapter
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityBaseBinding.inflate(layoutInflater)
        setContentView(binding.root)
    }

    @SuppressLint("WrongConstant")
    fun getLinearLayoutManager(orientation: Int = LinearLayoutManager.VERTICAL): LinearLayoutManager {
        return LinearLayoutManager(this,orientation,false)
    }

    fun getItemDecoration(orientation: Int = DividerItemDecoration.VERTICAL): DividerItemDecoration {
        return DividerItemDecoration(this,orientation)
    }
}